package lab04.test04;

/**
 * Created by AIR on 2017/12/28.
 */

public class NumberThread implements Runnable{

    int count = 1, number;

    public NumberThread(int num) {
        number = num;
        System.out.println("创建线程：" + number);
    }


    @Override
    public void run() {
        while (true) {
            System.out.println("线程" + number + ":计数" + count);
            if (++count == 6) return;
        }
    }

}

